<?php
/*
 * @Author: lokei
 * @Date: 2022-11-05 21:45:10
 * @LastEditors: lokei
 * @LastEditTime: 2023-01-14 18:08:58
 * @Description: 
 */
$router->group(['prefix' => env('ROUTER_PREFIX') . 'api'], function () use ($router) {
	
	/** 行业人员 */
	$router->group(['prefix' => 'master'], function () use ($router) {
		// Master
		$router->get('get', [
			'as' => 'getMaster', 'uses' => '\App\Http\Controllers\Master\MasterController@get'
		]);
		$router->get('list', [
			'as' => 'listMaster', 'uses' => '\App\Http\Controllers\Master\MasterController@list'
		]);
		$router->post('create', [
			'as' => 'createMaster', 'uses' => '\App\Http\Controllers\Master\MasterController@create'
		]);
		$router->post('update', [
			'as' => 'updateMaster', 'uses' => '\App\Http\Controllers\Master\MasterController@update'
		]);
		$router->post('bindUser', [
			'as' => 'bindUserMaster', 'uses' => '\App\Http\Controllers\Master\MasterController@bindUser'
		]);

    });

	$router->group(['prefix' => 'master/service'], function () use ($router) {
		// Master
		$router->get('ofMaster', [
			'as' => 'ofMasterService', 'uses' => '\App\Http\Controllers\Master\ServiceController@ofMaster'
		]);
		$router->post('create', [
			'as' => 'createService', 'uses' => '\App\Http\Controllers\Master\ServiceController@create'
		]);
		$router->post('update', [
			'as' => 'updateService', 'uses' => '\App\Http\Controllers\Master\ServiceController@update'
		]);
		$router->post('delete', [
			'as' => 'deleteService', 'uses' => '\App\Http\Controllers\Master\ServiceController@delete'
		]);

    });

	
	/** 司机 */
	$router->group(['prefix' => 'master/driver', 'middleware' => 'auth'], function () use ($router) {
		// Driver
		$router->post('register', [
			'as' => 'registerDriver', 'uses' => '\App\Http\Controllers\Master\DriverController@register'
		]);
		$router->post('update', [
			'as' => 'updateDriver', 'uses' => '\App\Http\Controllers\Master\DriverController@update'
		]);
		$router->get('ofMe', [
			'as' => 'ofMeDriver', 'uses' => '\App\Http\Controllers\Master\DriverController@ofMe'
		]);
	});
	/** 司机 */
	$router->group(['prefix' => 'master/driver'], function () use ($router) {
		// Driver
		$router->get('get', [
			'as' => 'getDriver', 'uses' => '\App\Http\Controllers\Master\DriverController@get'
		]);
		$router->get('list', [
			'as' => 'listDriver', 'uses' => '\App\Http\Controllers\Master\DriverController@list'
		]);
		$router->post('accept', [
			'as' => 'acceptDriver', 'uses' => '\App\Http\Controllers\Master\DriverController@accept'
		]);
		$router->post('reject', [
			'as' => 'rejectDriver', 'uses' => '\App\Http\Controllers\Master\DriverController@reject'
		]);
	});
});